package cn.novel.bm.controller.novel;

import cn.novel.bm.domain.novel.Paragraph;
import cn.novel.bm.util.ResponseResult;
import io.swagger.annotations.*;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;

//@RequestMapping(value = "/paragraph", produces = MediaType.APPLICATION_JSON_VALUE)
//@RestController
//@Api(tags = "段落管理")
public class ParagraphController {

    @PostMapping(path = "/")
    @ApiOperation(value = "创建段落")

    public ResponseResult<Void> create(@RequestBody Paragraph paragraph) {
        return new ResponseResult<>();
    }


    @PutMapping(path = "/")
    @ApiOperation(value = "编辑段落")

    public ResponseResult<Void> edit(@RequestBody Paragraph paragraph) {
        return new ResponseResult<>();
    }

    @DeleteMapping(path = "/{paragraphId}")
    @ApiOperation(value = "删除段落")

    public ResponseResult<Void> delete(@PathVariable int paragraphId) {
        return new ResponseResult<>();
    }


    @ApiOperation(value = "查询段落列表")
    @GetMapping(path = "/findList")

    public ResponseResult<List<Paragraph>> findList(@RequestParam int chapterId) {
        return new ResponseResult<>();
    }


    @ApiOperation(value = "合并角色", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    @PostMapping(path = "/mergeRole", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "novelId", paramType = "formData"),
            @ApiImplicitParam(name = "sourceRoleId", paramType = "formData"),
            @ApiImplicitParam(name = "targetRoleId", paramType = "formData"),

    })
    public ResponseResult<Void> assignOEditor(@RequestParam @ApiParam(value = "小说ID") int novelId
            , @RequestParam @ApiParam(value = "原角色") int sourceRoleId
            , @RequestParam @ApiParam(value = "目标角色") int targetRoleId) {
        return new ResponseResult<>();
    }

}
